package ar.edu.unq.wannaplay.utils;

import java.io.Serializable;
import java.util.LinkedList;
import java.util.List;

import org.joda.time.Interval;

import ar.edu.unq.wannaplay.dtos.ClientDTO;
import ar.edu.unq.wannaplay.dtos.EmployeeDTO;
import ar.edu.unq.wannaplay.dtos.ProjectDTO;
import ar.edu.unq.wannaplay.dtos.SkillDTO;

public class ProjectEditer implements Serializable {

    private static final long serialVersionUID = 1L;

    private int manHour;

    private String name;

    private List<EmployeeDTO> employeesDTO;

    private int id;

    private List<SkillDTO> skillsDTO;

    private Interval interval;

    private ClientDTO client;

    public ProjectEditer(final ProjectDTO aProject) {
        id = aProject.getId();
        this.setName(aProject.getName());
        this.setManHour(aProject.getManHour());
        this.setEmployeesDTO(aProject.getEmployees());
        this.setInterval(aProject.getInterval());
        this.setSkillsDTO(aProject.getRequirements());
        this.setClient(aProject.getClientDTO());
    }

    public ProjectEditer() {
        this.setName("");
        this.setManHour(0);
        this.setEmployeesDTO(new LinkedList<EmployeeDTO>());

        this.setSkillsDTO(new LinkedList<SkillDTO>());
    }

    public void setName(final String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public void setManHour(final int manHour) {
        this.manHour = manHour;
    }

    public int getManHour() {
        return manHour;
    }

    public void setId(final int id) {
        this.id = id;
    }

    public int getId() {
        return id;
    }

    public void setEmployeesDTO(final List<EmployeeDTO> employeesDTO) {
        this.employeesDTO = employeesDTO;
    }

    public List<EmployeeDTO> getEmployeesDTO() {
        return employeesDTO;
    }

    public void setInterval(final Interval interval) {
        this.interval = interval;
    }

    public Interval getInterval() {
        return interval;
    }

    public void setSkillsDTO(final List<SkillDTO> theSkills) {
        this.skillsDTO = theSkills;
    }

    public List<SkillDTO> getSkilsDTO() {
        return skillsDTO;
    }

    public void setClient(final ClientDTO client) {
        this.client = client;
    }

    public ClientDTO getClient() {
        return client;
    }

}
